package sever;

import constant.DatabaseConfig;
import com.alibaba.druid.pool.DruidDataSourceFactory;

import javax.sql.DataSource;


public class DatabaseConnectionPool {
    public static DataSource dataSource;

    static {
        try {
            // 创建连接池
            dataSource = DruidDataSourceFactory.createDataSource(DatabaseConfig.getProperties());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
